﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Web.Mvc;
using System.Linq.Expressions;
using System.Web.Mvc.Html;

namespace FluentMVC
{
    public static class FluentInputExpressions
    {
        public static string TextBox<T>(this HtmlHelper helper, Expression<Func<T, object>> expression)
        {
            return helper.TextBox<T>(expression, null);
        }

        public static string TextBox<T>(this HtmlHelper helper, Expression<Func<T, object>> expression, object value)
        {
            return helper.TextBox<T>(expression, value, null);
        }

        public static string TextBox<T>(this HtmlHelper helper, Expression<Func<T, object>> expression, object value, object htmlAttributes)
        {
            return helper.TextBox(expression.GetMemeberName(), value, htmlAttributes);
        }
    }
}
